﻿using System;
using System.Xml.Linq;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace HigLabo.Net.BoxNet
{
    /// <summary>
    /// 
    /// </summary>
    public partial class BoxClient
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Folder> CreateFolderAsync(CreateFolderCommand command)
        {
            return AsyncCall<CreateFolderCommand, Folder>(this.CreateFolder, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Folder> GetFolderInfoAsync(GetFolderInfoCommand command)
        {
            return AsyncCall<GetFolderInfoCommand, Folder>(this.GetFolderInfo, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<ItemCollection> RetrieveFolderItemsAsync(RetrieveFolderItemsCommand command)
        {
            return AsyncCall<RetrieveFolderItemsCommand, ItemCollection>(this.RetrieveFolderItems, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Folder> UpdateFolderInfoAsync(UpdateFolderInfoCommand command)
        {
            return AsyncCall<UpdateFolderInfoCommand, Folder>(this.UpdateFolderInfo, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<File> GetFileInfoAsync(GetFileInfoCommand command)
        {
            return AsyncCall<GetFileInfoCommand, File>(this.GetFileInfo, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<File> UpdateFileInfoAsync(UpdateFileInfoCommand command)
        {
            return AsyncCall<UpdateFileInfoCommand, File>(this.UpdateFileInfo, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<File> CopyFileAsync(CopyFileCommand command)
        {
            return AsyncCall<CopyFileCommand, File>(this.CopyFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> DeleteFileAsync(DeleteFileCommand command)
        {
            return AsyncCall<DeleteFileCommand, String>(this.DeleteFile, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Byte[]> DownloadFileAsync(DownloadFileCommand command)
        {
            return AsyncCall<DownloadFileCommand, Byte[]>(this.DownloadFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<CommentCollection> GetCommentsOnFileAsync(GetCommentsOnFileCommand command)
        {
            return AsyncCall<GetCommentsOnFileCommand, CommentCollection>(this.GetCommentsOnFile, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<TemporaryFile> UploadNewVersionAsync(UploadNewVersionFileCommand command)
        {
            return AsyncCall<UploadNewVersionFileCommand, TemporaryFile>(this.UploadNewVersion, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Comment> AddCommentToFileAsync(AddCommentCommand command)
        {
            return AsyncCall<AddCommentCommand, Comment>(this.AddCommentToFile, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Comment> AddCommentToDiscussionAsync(AddCommentCommand command)
        {
            return AsyncCall<AddCommentCommand, Comment>(this.AddCommentToDiscussion, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Comment> ChangeCommentMessageAsync(ChangeCommentCommand command)
        {
            return AsyncCall<ChangeCommentCommand, Comment>(this.ChangeCommentMessage, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Comment> GetCommentInfoAsync(GetCommentCommand command)
        {
            return AsyncCall<GetCommentCommand, Comment>(this.GetCommentInfo, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        public Task<String> DeleteCommentAsync(DeleteCommentCommand command)
        {
            return AsyncCall<DeleteCommentCommand, String>(this.DeleteComment, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Discussion> CreateDiscussionAsync(CreatediscussionCommand command)
        {
            return AsyncCall<CreatediscussionCommand, Discussion>(this.CreateDiscussion, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<CommentCollection> RetrieveDiscussionCommentsAsync(RetrieveDiscussionCommentsCommand command)
        {
            return AsyncCall<RetrieveDiscussionCommentsCommand, CommentCollection>(this.RetrieveDiscussionComments, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<Discussion> UpdateDiscussionAsync(UpdateDiscussionCommand command)
        {
            return AsyncCall<UpdateDiscussionCommand, Discussion>(this.UpdateDiscussion, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<EventCollection> GetEventsAsync(GetEventsCommand command)
        {
            return AsyncCall<GetEventsCommand, EventCollection>(this.GetEvents, command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Task<TemporaryFile> UploadFileAsync(UploadFileCommand command)
        {
            return AsyncCall<UploadFileCommand, TemporaryFile>(this.UploadFile, command);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Task<Folder> GetRootFolderAsync()
        {
            return AsyncCall<Folder>(this.GetRootFolder);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Task<ItemCollection> GetRootItemsAsync()
        {
            return AsyncCall<ItemCollection>(this.GetRootItems);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public Task<List<Folder>> GetRootFoldersAsync()
        {
            return AsyncCall<List<Folder>>(this.GetRootFolders);
        }
    }
}
